package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.pojo.Elderly;
import org.example.pojo.Family;
import org.example.pojo.Volunteer;

import java.util.List;

/**
 * @Description: mapper层接口
 * @Author:曹震
 * @Date: 2024/11/29 19:17
 */
@Mapper
public interface UserControlMapper {
    List<Volunteer> findVolunteer();
    int insertElderly( Elderly elderly);
    int setPassword(@Param("userType") String userType,@Param("userId")String userId,@Param("newPassword")String newPassword);

    int findAdmin(@Param("communityId") String communityId, @Param("password") String password);

    List <Volunteer> selectAllVolunteer(String volunteerName);

    Volunteer getVolunteerById(@Param("volunteersId") String volunteersId);

    int  refuse(@Param("volunteersId") String volunteersId,@Param("objection") String objection);

    int  pass(@Param("volunteersId") String volunteersId);

    List<Elderly > findByName(String query);

   List<Elderly>  findByIdCard(String query);

    List<Elderly> selectElderlyAll();

    Volunteer volunteerRole(String userId);

    Elderly elderlyRole(String userId);

    Family familyRole(String userId);
}
